 <style>
        body {
            margin: 0;
            font-family: Arial, sans-serif;
            font-size: 16px; /* 基础字体大小 */
        }
        .header {
            height: 3em;
            background-color: #f8f9fa;
            padding: 0em; /* 10px 20px */
            box-shadow: 0.125em 0.25em rgba(0, 0, 0, 0.1); /* 2px 4px */
            position: relative;
        }

        .header_box {
			
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 100%;
        }

        .avatar-container {
			top: 0.2em;
            width: 10em; /* 固定宽度 */
            height: 100%; /* 高度占满 header */
            position: relative;
           
        }

.avatar {
    position: absolute;
    top: 0.3em;
    left: 0;
    width: 9em !important; /* 强制宽度 */
    height: 2.1em!important; /* 强制高度 */
 
}

        .header_right {
            display: flex;
            align-items: center;
            margin-left: 0.1em; /* 距离 avatar-container 2em */
        }

        .queryorder {
            margin-left: 0.2em; /* 10px */
            text-decoration: none;
            color: #007bff;
            font-size: 0.875em; /* 14px */
        }

        @media (max-width: 37.5em) { /* 600px */
            .header_box {
                flex-wrap: wrap; /* 允许换行 */
            }
            .header_right {
                margin-top: 0.5em; /* 15px */
                margin-bottom: 0.5em; /* 15px */
                margin-left: auto; /* 将 header_right 推到右边 */
            }
        }
    </style>
	
 <header class="header">
        <div class="header_box">
            <div class="avatar-container">
                <img
                    src="<?php echo $logo?>"
                    class="avatar"
                    alt="<?php echo $hometitle?>"
                />
            </div>

            <div class="header_right">
                <a class="queryorder" href="./user" style="margin-right:0.0625em">用户中心</a>
                <a class="queryorder" href="./?mod=query">查询订单</a>
            </div>
        </div>
    </header>